{{ define "main" }}
<div class="hero tall">
  <div class="container">
    <h1>{{ i18n "home_hero_title" | safeHTML }}</h1>
    <h2>{{ i18n "home_hero_annual_report" | safeHTML }}</h2>
    <div class="buttons flex">
      <div class="flex1 tar mr1m">
        <a class="dib" href="{{ "getting-started/" | relLangURL }}">{{ i18n "home_hero_getting_started" | safeHTML }}</a>
      </div>
      <div class="flex1 tal ml1m">
        <a class="dib" href="{{ "become-a-sponsor/" | relLangURL }}">{{ i18n "home_hero_sponsor" | safeHTML }}</a>
      </div>
    </div>
  </div>
</div>
<div class="page-content">
  <div class="wrapper">
    <div class="">
      <div class="pure-g home">
        <div class="pure-u-1 pure-u-md-1-2">
          <div class="grid-container">
            <h2 class="through-line"><a href="/blog/">{{ i18n "home_from_our_blog" }}</a></h2>
              <ul class="post-list">
                {{ $enPosts := where .Sites.First.RegularPages "Type" "in" (slice "post") | first 3 }}
                {{ $posts := where .Site.RegularPages "Type" "in" (slice "post") | first 3 | lang.Merge $enPosts }}
                {{ range $posts }}
                  <li>
                    <span class="post-meta">{{ .Date.Format $.Site.Params.time_format_default }}</span>
                    <h2>
                      <a class="post-link" href="{{ .RelPermalink }}" hreflang="{{ .Language.Params.languageCode }}">{{ .Title }}</a>
                    </h2>
                    {{ with .Params.excerpt }}
                      {{ . | markdownify }}
                    {{ else }}
                      {{ .Summary }}
                    {{ end }}
                    <p><a href="{{ .RelPermalink }}" hreflang="{{ .Language.Params.languageCode }}">{{ i18n "read_more" }}</a></p>
                  </li>
                {{ end }}
              </ul>
              {{ with .OutputFormats.Get "RSS" -}}
                <p class="rss-subscribe">
                  <i class="fas fa-rss-square" aria-hidden="true"></i>
                  {{ i18n "subscribe_rss" (dict "Permalink" "/feed.xml") | safeHTML }}
                </p>
              {{ end  }}
          </div>
        </div>
        <div class="pure-u-1 pure-u-md-1-2">
          <div class='grid-container'>
            <h2 class="through-line"><a href="{{ "sponsors/" | relLangURL }}">{{ i18n "home_major_sponsors" }}</a></h2>
            <div class="text-center home_sponsors">
{{ range $.Site.Data.sponsors.platinum }}
              <a href="{{ .url }}" {{ if .id }}id="{{ .id }}"{{ end }} {{ if .nofollow }}rel="nofollow"{{ end }}{{ if .sponsored }}rel="sponsored"{{ end }}><img src="/images/sponsors/small/{{ .image }}" alt="{{ .name }}" width="80" height="48" class="sponsor-logo-small"></a>
{{ end }}
{{ range $.Site.Data.sponsors.gold }}
              <a href="{{ .url }}" {{ if .id }}id="{{ .id }}"{{ end }} {{ if .nofollow }}rel="nofollow"{{ end }}{{ if .sponsored }}rel="sponsored"{{ end }}><img src="/images/sponsors/small/{{ .image }}" alt="{{ .name }}" width="80" height="48" class="sponsor-logo-small"></a>
{{ end }}
{{ range $.Site.Data.sponsors.silver }}
              <a href="{{ .url }}" {{ if .id }}id="{{ .id }}"{{ end }} {{ if .nofollow }}rel="nofollow"{{ end }}{{ if .sponsored }}rel="sponsored"{{ end }}><img src="/images/sponsors/small/{{ .image }}" alt="{{ .name }}" width="80" height="48" class="sponsor-logo-small"></a>
{{ end }}
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
{{ end }}
